"""dj111 URL Configuration

The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/1.11/topics/http/urls/
Examples:
Function views
    1. Add an import:  from my_app import views
    2. Add a URL to urlpatterns:  url(r'^$', views.home, name='home')
Class-based views
    1. Add an import:  from other_app.views import Home
    2. Add a URL to urlpatterns:  url(r'^$', Home.as_view(), name='home')
Including another URLconf
    1. Import the include() function: from django.conf.urls import url, include
    2. Add a URL to urlpatterns:  url(r'^blog/', include('blog.urls'))
"""
from django.conf.urls import url,include

from plan import views
from plan import ajax_views, import_views


urlpatterns = [
    #添加工单信息
    url(r'^add_order/', views.add_order,name='add_order'),
    #编辑工单信息
    url(r'^edit_order/(?P<edit_id>\d+)/$', views.add_order,name='edit_order'),
    #工单信息列表展示
    url(r'order_list/',views.OrderListView.as_view(),name='order_list'),
    #添加计划
    url(r'^add_plan/(?P<order_id>\d+)/', views.add_plan,name='add_plan'),
    # url(r'^add_one_plan/(?P<order_id>\d+)/', views.add_one_plan,name='add_plan'),
    # 批量上传工单
    url(r'^order_upload/', views.order_upload,name='order_upload'),
    # 删除订单
    url(r'^delete_order/(?P<order_id>\d+)/', views.delete_order,name='delete_order'),

    #计划列表展示
    url(r'^plan_list/',views.PlanListView.as_view(),name='plan_list'),
    #编辑计划
    url(r'^edit_plan/(?P<plan_id>\d+)/',views.edit_plan,name='edit_plan'),
    # url(r'/sequence/',ajax_views.ajax_sequence,name='sequence'),
    #合并计划
    url(r'^merge_plan/(?P<plan_id>\d+)/',views.MergePlanView.as_view(),name='merge_plan'),
    #修改生产顺序
    url(r'^seq/(?P<plan_id>\d+)/',views.seq,name='seq'),
    # 删除计划
    url(r'^delete_plan/(?P<plan_id>\d+)/',views.delete_plan,name='delete_plan'),
    # formSet 批量编辑计划
    url(r'^bulk_edit/',views.bulk_edit_plan,name='bulk_edit'),

    #机种信息查询
    url(r'^search/(?P<plan_id>\d+)/',views.search,name='search'),

    #输入日报路由,添加日报
    url(r'^add_daily/(?P<plan_id>\d+)/',views.add_daily_production,name='add_daily'),
    #编辑日报
    url(r'^edit_daily/(?P<daily_id>\d+)/',views.edit_daily,name='edit_daily'),
    # 日报列表
    url(r'^daily_list/',views.DailyListView.as_view(),name='daily_list'),

    # 计划日报进度列表
    url(r'^daily_status/',views.daily_status,name='daily_status'),

    #单台标准工时列表
    url(r'^st_list/',views.st,name='st_list'),
    #添加标准工时
    url(r'^add_st/',views.edit_st,name='add_st'),
    #编辑标准工时
    url(r'^edit_st/(?P<st_id>\d+)/',views.edit_st,name='edit_st'),


    #ajax 请求根据客户查找 对应的机种名
    url(r'^ajax_customer/', ajax_views.ajax_customer,name='ajax_customer'),
    #ajax 请求获取产能
    url(r'^ajax_calculate/', ajax_views.ajax_calculate,name='ajax_calculate'),
    #测试vue axios
    url(r'^test_axios/', ajax_views.test_axios,name='test_axios'),

    #机种名导入路由
    url(r'^import_sku/',import_views.import_sku,name='import_sku'),
    #机种名工工程线别路由
    url(r'^import_gy/',import_views.import_gy,name='import_gy'),
    #机种名工艺数据路由
    url(r'^import_gyflow/',import_views.import_gyflow,name='import_gyflow'),
    #机种工程面线别对应的产能数据路由
    url(r'^import_cap/',import_views.import_cap,name='import_cap'),
    #机种工程面线别对应的点数路由
    url(r'^import_pro/',import_views.import_process_num,name='import_pro'),
    #更新cap数据
    url(r'^update_cap/',import_views.update_cap,name='update_cap'),
    #新机种数据添加
    url(r'^new_sku/',import_views.new_sku,name='new_sku'),
]
